# Contributor: Rasmus Thomsen <oss@cogitri.dev>
# Maintainer: Rasmus Thomsen <oss@cogitri.dev>
pkgname=glibd
pkgver=2.3.0
pkgrel=3
pkgdesc="D bindings for the GLib C Utility Library"
url="https://github.com/gtkd-developers/GlibD"
arch="x86_64 aarch64" # ldc
license="GPL-3.0-or-later"
makedepends="meson gobject-introspection-dev glib-dev ldc ldc-runtime gir-to-d"
subpackages="$pkgname-dev $pkgname-dbg"
source="https://github.com/gtkd-developers/GlibD/archive/v$pkgver/glibd-$pkgver.tar.gz
	fix-sonames.patch
	glib-2.68.patch
	glib-2.70.patch
	glib-2.72.patch
	"
builddir="$srcdir/GlibD-$pkgver"

build() {
	abuild-meson . output
	meson compile ${JOBS:+-j ${JOBS}} -C output
}

check() {
	meson test --no-rebuild -v -C output
}

package() {
	DESTDIR="$pkgdir" meson install --no-rebuild -C output
}

sha512sums="
3312eb81f6a586be4755942c23f46b23144c7ca5239a187eb30917f8e1c6726a63ecdfbe408276502f688f39dfb0f281248905a88692ec7d79875af53f893455  glibd-2.3.0.tar.gz
d97413d6615788f456eaa762e0f384ac9f3a1739d669013cf07631719783b24b4db89cdbb9f8b58bb4e49ce71a7783cf3f0cd9f9bd2879aa739d140b9b0d1c40  fix-sonames.patch
39e4eaba9fe01ae072e9c179b3e132bd241c94339ca31a47e64cda460aa9cd2ba2b59c8c25e0fb095386b10d83a033b1860afe8ca82e4a2076934a96a4a94012  glib-2.68.patch
b99b242a2749d5c6edcad6c89d52e9de298984538a6fab5bd4baadb217ed5106b3a9a9cbb75203d5516431a69a6d22885d497b0e04393e2e14c4d34609a16ec8  glib-2.70.patch
bb483784ba2157988bac3bd418666babf48f0b4a628bdeba692ca5acbf8f67f5b349d83853171f005addbc7c2122773bfc18a0c430f8ed23dc9548e7f76ca725  glib-2.72.patch
"
